package com.xc.erp.modules.erp.controller.log;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.xc.erp.modules.erp.domain.AjaxResult;
import com.xc.erp.modules.erp.domain.pojo.JshLog;
import com.xc.erp.modules.erp.domain.vo.LogUserVo;
import com.xc.erp.modules.erp.service.JshLogService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author 王嘉伟 2022/12/27
 * @DateTime: 2022/12/27 13:52
 */
@Api("日志管理")
@RestController
@RequestMapping("/log")
public class JshLogController {

    @Autowired
    private JshLogService jshLogService;

    @ApiOperation("查询所有日志记录")
    @GetMapping("logList/{page}/{limit}")
    public AjaxResult list(@PathVariable Integer page, @PathVariable Integer limit, LogUserVo logUserVo){
        IPage<LogUserVo> iPage = jshLogService.logListPage(page,limit,logUserVo);
        return AjaxResult.success(iPage);
    }
}
